* Aggregate Analyses *
use "Italy regional vax data.dta", clear

* Figure 1 *
* Panel C *
twoway scatter no_doses mn_macro_sc_smallnoincome, graphregion(color(white)) mcolor(black) mlabel(region_code) ti("c", position(11) color(black)) xti(" " "Micucci-Nuzzo social capital index") yti("% Unvaccinated" " ") scale(.75) saving(mnscatter.gph, replace)
* Panel D *
reg no_doses mn_macro_sc_smallnoincome covid_death_rate
coefplot, drop(_cons) xline(0) graphregion(color(white)) ylabel(1 "Social capital index" 2 "COVID-19 death rate") ti("d", position(11) color(black)) xti(" " "Change in predicted % unvaccinated") mcolor(black) scale(.75) saving(unvaxreg.gph, replace)

* Table S1 *
* Aggregate regression analyses *
reg no_doses  covid_death_rate mn_macro_sc_smallnoincome
outreg2 using tables1, word dec(3) label replace
reg no_doses  covid_death_rate cartocci_sc
outreg2 using tables1, word dec(3) label append
reg no_doses  covid_death_rate sab_bonding_sc
outreg2 using tables1, word dec(3) label append
reg no_doses  covid_death_rate sab_bridging_sc
outreg2 using tables1, word dec(3) label append

* Individual level data *
use "kk_unvax_replication_survey_data.dta", clear

* Significance tests mentioned in text *
svy: reg unvax left if left==1|right==1
svy: reg unvax pref_FI if right == 1
svy: reg unvax other_na if other_na==1|pref_FDI==1|pref_Lega==1

* Figure 2 and Table S3*
* Panel A: Social trust *
svy:logit unvax rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5
outreg2 using tables3, word dec(3) label replace
margins, at(rol=2.67 social_trust=(0(1)10) pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages5=1 ages2=0 ages3=0 ages4=0) post
marginsplot, recast(line) recastci(rarea) xti("Social trust") yti("Probability Unvaccinated" " ") ti("a", position(11) color(black)) plot1opts(color(black)) ciopts(color(gs10)) ylabel(0 .1 .2 .3) xlabel(0 "0" 1 2 3 4 5 6 7 8 9 10 "10") graphregion(color(white)) saving(kk_fig3_a.gph, replace)
* Panel B: Rule of Law *
svy:logit unvax rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5 
margins, at(rol=(1(.1)4)  social_trust=5 pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages5=1 ages2=0 ages3=0 ages4=0) post 
marginsplot, recast(line) recastci(rarea) xti("Rule of law index") yti("Probability Unvaccinated" " ") ti("b", position(11) color(black)) ylabel(0 .1 .2 .3 .4 .5 .6) plot1opts(color(black)) ciopts(color(gs10))  graphregion(color(white)) saving(kk_fig3_b.gph, replace)
graph combine "kk_fig3_a.gph" "kk_fig3_b.gph", rows(2) graphregion(color(white)) xsize(8.5) ysize(11)
* With alternate operationalization of DV -- one or fewer doses *
svy:logit oneorfewer rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5
outreg2 using tables3, word dec(3) label append
* with alternate operationalization of DV -- number of doses *
gen num_doses = COR012
recode num_doses (1=0) (2=1) (3=2) (4=3)
svy:reg num_doses rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5
outreg2 using tables3, word dec(3) label append
* Results similar if using a count model *
svy:poisson num_doses rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5

* Figure 3: % Unvaccinated by Party *
svy:reg unvax i.party_preference_2
margins party_preference_2, post
marginsplot, recast(bar) graphregion(color(white)) ti("") yti("") ylabel(0 "0%" .05 "5%" .1 ".10%" .15 "15%" .2 "20%") ///
xscale(range(.75 8.25)) xti(" " "Party choice") yti("% Unvaccinated" " ") scale(.75) plotopts(color(gs5) barw(.75)) ciopts(color(black)) saving(kk_unvax_fig2_a.gph, replace)

* Figure 4 and SI Table S4 *
use "kk_unvax_replication_survey_data.dta", clear
gen n = _n
gen dydxunvax = .
gen sedydxunvax = .

gen support_govt_ukraine = govt_ukraine
recode support_govt_ukraine (4=1) (3=1) (2=0) (1=0)

svy:logit support_govt_ukraine unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
outreg2 using tables4, word dec(3) label replace
margins, dydx(unvax) at(pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages2=0 ages3=0 ages4=0 ages5=0) post
matrix list r(table)
matrix results = r(table)
replace dydxunvax = results[1,1] if n == 3
replace sedydxunvax = results[2,1] if n == 3

svy:logit nuclear unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
outreg2 using tables4, word dec(3) label append
margins, dydx(unvax) at(pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages2=0 ages3=0 ages4=0 ages5=0) post
matrix list r(table)
matrix results = r(table)
replace dydxunvax = results[1,1] if n == 2
replace sedydxunvax = results[2,1] if n == 2

svy:logit defend_nato_bin unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
outreg2 using tables4, word dec(3) label append
margins, dydx(unvax) at(pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages2=0 ages3=0 ages4=0 ages5=0) post
matrix list r(table)
matrix results = r(table)
replace dydxunvax = results[1,1] if n == 1
replace sedydxunvax = results[2,1] if n == 1

drop if n >3
gen l = .
replace l = dydxunvax-(1.96*sedydxunvax) if dydxunvax !=.
gen u = .
replace u = dydxunvax+(1.96*sedydxunvax) if dydxunvax !=.


twoway (dot  dydxunvax n,  horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rspike u l n,  horizontal color(black)), yti("") graphregion(color(white)) ///
xline(0)  scale(.75) ///
ylabel(1 "Support defending NATO ally" 2 "Fear nuclear war" 3 "Support government aid to Ukraine", angle(0)) ///
ti("") legend(off) xti(" " "Difference in probability of support (unvaccinated vs. vaccinated)") xlabel(-.6 -.5 -.4 -.3 -.2 -.1 0 .1) yscale(range(.75 3.25)) 
clear

* Figure S2: % 1 or fewer doses by Party *
svy:reg oneorfewer i.party_preference_2
margins party_preference_2, post
marginsplot, recast(bar) graphregion(color(white)) ti("") yti("") ylabel(0 "0%" .05 "5%" .1 ".10%" .15 "15%" .2 "20%") ///
xscale(range(.75 8.25)) xti(" " "Party choice") yti("% Not Fully Vaccinated" " ") scale(.75) plotopts(color(gs5) barw(.75)) ciopts(color(black)) saving(kk_unvax_figs2.gph, replace)

* Figure S3 AND Table S5 *
svy:reg faith_draghi unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
estimates store A
outreg2 using tables5, word dec(3) label replace
svy:reg faith_conte unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
estimates store B
outreg2 using tables5, word dec(3) label append
svy:reg faith_letta unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
estimates store C
outreg2 using tables5, word dec(3) label append
svy:reg faith_berlusconi unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
estimates store D
outreg2 using tables5, word dec(3) label append
svy:reg faith_salvini unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
estimates store E
outreg2 using tables5, word dec(3) label append
svy:reg faith_meloni unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5 
estimates store F
outreg2 using tables5, word dec(3) label append

coefplot (A, msymbol(square)) (B, msymbol(circle)) (C, msymbol(triangle)) (D, msymbol(diamond)) (E, msymbol(square_hollow)) (F, msymbol(circle_hollow)), drop(pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female ages2 ages3 ages4 ages5  _cons) ///
xline(0) graphregion(color(white)) legend(order(2 "Draghi" 4 "Conte" 6 "Letta" 8 "Berlusconi" 10 "Salvini" 12 "Meloni")rows(1)) ylabel(1 " ", notick) xti("Difference in faith (unvaccinated vs. at least 1 dose)") scale(.75) saving(kk_unvax_figs3.gph, replace)

* Figure S4: Using only "Control" group of split sample questions *
use "kk_unvax_replication_survey_data.dta", clear
gen n = _n
gen dydxunvax = .
gen sedydxunvax = .

gen support_govt_ukraine = govt_ukraine
recode support_govt_ukraine (4=1) (3=1) (2=0) (1=0)

svy:logit support_govt_ukraine unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione education female ages2 ages3 ages4 ages5 if govt_ukraine_control==1 
margins, dydx(unvax) at(pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 education=4 female=1 ages2=0 ages3=0 ages4=0 ages5=0) post
matrix list r(table)
matrix results = r(table)
replace dydxunvax = results[1,1] if n == 2
replace sedydxunvax = results[2,1] if n == 2

svy:logit defend_nato_bin unvax pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione education female ages2 ages3 ages4 ages5 if article5 == 0
margins, dydx(unvax) at(pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 education=4 female=1 ages2=0 ages3=0 ages4=0 ages5=0) post
matrix list r(table)
matrix results = r(table)
replace dydxunvax = results[1,1] if n == 1
replace sedydxunvax = results[2,1] if n == 1

drop if n >2
gen l = .
replace l = dydxunvax-(1.96*sedydxunvax) if dydxunvax !=.
gen u = .
replace u = dydxunvax+(1.96*sedydxunvax) if dydxunvax !=.

twoway (dot  dydxunvax n,  horizontal ndots(0) dcolor(white) symbol(circle) color(black)) ///
(rspike u l n,  horizontal color(black)), yti("") graphregion(color(white)) ///
xline(0)  scale(.75) ///
ylabel(1 "Defend NATO ally if attacked" 2 "Aid to Ukraine", angle(0)) ///
ti("") legend(off) xti(" " "Difference in probability of support") xlabel(-.6 -.5 -.4 -.3 -.2 -.1 0 .1) yscale(range(.5 2.5)) 

* Figure S5 and Table S6: Additional Age Analyses *
use "kk_unvax_replication_survey_data.dta", clear
* Historgram of Age *
hist age, percent color(gray) lcolor(black) graphregion(color(white)) yti("") ylabel(2 "2%" 4 "4%" 6 "6%" 8 "8%" 10 "10%")
* Age analysis *
gen fiftyplus = 0
replace fiftyplus = 1 if age >=50
replace fiftyplus = . if age == .
ttest unvax, by(fiftyplus)
gen age50_69 = 0
replace age50_69 = 1 if age > 49 & age < 70
gen age70plus = 0
replace age70plus = 1 if age > 69
label var age50_69 "Age: 50-69"
label var age70plus "Age: 70+"
gen age30_49 = 0
replace age30_49 = 1 if age < 50 & age > 29
label var age30_49 "Age: 30-49"

svy:logit unvax rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  age50_69 age70plus
outreg2 using tables6, word dec(3) label replace
svy:logit unvax rol social_trust pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female age30_49 age50_69 age70plus
outreg2 using tables6, word dec(3) label append

* Figure S1: Replicating Figure 2 with one or fewer doses as DV *
* Panel A: Social trust *
svy:logit oneorfewer rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5
outreg2 using tables3, word dec(3) label replace
margins, at(rol=2.67 social_trust=(0(1)10) pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages5=1 ages2=0 ages3=0 ages4=0) post
marginsplot, recast(line) recastci(rarea) xti("Social trust") yti("Probability Not Fully Vaccinated" " ") plot1opts(color(black)) ciopts(color(gs10)) ylabel(0 .1 .2 .3) xlabel(0 "0" 1 2 3 4 5 6 7 8 9 10 "10") ti("a", position(11) color(black))  graphregion(color(white)) saving(kk_figs1_a.gph, replace)
* Panel B: Rule of Law *
svy:logit oneorfewer rol social_trust  pref_FDI pref_Lega pref_FI pref_M5S pref_PD pref_Azione pref_Sinistra pref_IV education female  ages2 ages3 ages4 ages5 
margins, at(rol=(1(.1)4)  social_trust=5 pref_FDI=0 pref_Lega=0 pref_FI=0 pref_M5S=0 pref_PD=0 pref_Azione=0 pref_Sinistra=0 pref_IV=0 education=4 female=1 ages5=1 ages2=0 ages3=0 ages4=0) post 
marginsplot, recast(line) recastci(rarea) xti("Rule of law index") yti("Probability Not Fully Vaccinated" " ") ylabel(0 .1 .2 .3 .4 .5 .6) plot1opts(color(black)) ciopts(color(gs10)) ti("b", position(11) color(black))  graphregion(color(white)) saving(kk_figs1_b.gph, replace)
graph combine "kk_figs1_a.gph" "kk_figs1_b.gph", rows(2) graphregion(color(white)) xsize(8.5) ysize(11)
